<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      Pth-2.0.7
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-9.1">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 9.1
      </h4>
      <h3>
        Chapter&nbsp;9.&nbsp;General Libraries
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="popt.html" title="Popt-1.16">Prev</a>
          <p>
            Popt-1.16
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="ptlib.html" title="Ptlib-2.10.11">Next</a>
          <p>
            Ptlib-2.10.11
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="genlib.html" title=
          "Chapter&nbsp;9.&nbsp;General Libraries">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="pth" name="pth"></a>Pth-2.0.7
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to Pth
        </h2>
        <p>
          The <span class="application">Pth</span> package contains a very
          portable POSIX/ANSI-C based library for Unix platforms which
          provides non-preemptive priority-based scheduling for multiple
          threads of execution (multithreading) inside event-driven
          applications. All threads run in the same address space of the
          server application, but each thread has its own individual
          program-counter, run-time stack, signal mask and errno variable.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "https://ftp.gnu.org/gnu/pth/pth-2.0.7.tar.gz">https://ftp.gnu.org/gnu/pth/pth-2.0.7.tar.gz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download (FTP): <a class="ulink" href=
                "ftp://ftp.gnu.org/gnu/pth/pth-2.0.7.tar.gz">ftp://ftp.gnu.org/gnu/pth/pth-2.0.7.tar.gz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: 9cb4a25331a4c4db866a31cbe507c793
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 652 KB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 5 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 0.2 SBU
              </p>
            </li>
          </ul>
        </div>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/pth">http://wiki.linuxfromscratch.org/blfs/wiki/pth</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of Pth
        </h2>
        <div class="admon caution">
          <img alt="[Caution]" src="../images/caution.png" />
          <h3>
            Caution
          </h3>
          <p>
            Don't add the <code class="option">--enable-pthread</code>
            parameter to the <span class=
            "command"><strong>configure</strong></span> command below else
            you will overwrite the pthread library and interface header
            installed by the <span class="application">Glibc</span> package
            in LFS.
          </p>
        </div>
        <p>
          Install <span class="application">Pth</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class=
"command">sed -i 's#$(LOBJS): Makefile#$(LOBJS): pth_p.h Makefile#' Makefile.in &amp;&amp;
./configure --prefix=/usr           \
            --disable-static        \
            --mandir=/usr/share/man &amp;&amp;
make</kbd>
</pre>
        <p>
          To test the results, issue: <span class="command"><strong>make
          test</strong></span>.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install &amp;&amp;
install -v -m755 -d /usr/share/doc/pth-2.0.7 &amp;&amp;
install -v -m644    README PORTING SUPPORT TESTS \
                    /usr/share/doc/pth-2.0.7</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <span class="command"><strong>sed -i 's#$(LOBJS)
          ...</strong></span>: This <span class=
          "command"><strong>sed</strong></span> fixes a race condition in the
          <code class="filename">Makefile</code>. It allows you to run
          <span class="command"><strong>make</strong></span> with multiple
          jobs (e.g., <span class="command"><strong>make -j4</strong></span>)
          .
        </p>
        <p>
          <em class="parameter"><code>--disable-static</code></em>: This
          switch prevents installation of static versions of the libraries.
        </p>
        <p>
          <em class="parameter"><code>--mandir=/usr/share/man</code></em>:
          This switch puts the man pages in <code class=
          "filename">/usr/share/man</code> instead of <code class=
          "filename">/usr/man</code>.
        </p>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Program:</strong>
              <span class="segbody">pth-config</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Library:</strong>
              <span class="segbody">libpth.so</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directory:</strong>
              <span class="segbody">/usr/share/doc/pth-2.0.7</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="pth-config" name="pth-config"></a><span class=
                    "term"><span class=
                    "command"><strong>pth-config</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a utility used to configure and build applications
                    based on the pth(3) library. It can be used to query the
                    C compiler and linker flags which are required to
                    correctly compile and link the application against the
                    pth(3) library.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libpth" name="libpth"></a><span class=
                    "term"><code class="filename">libpth.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    contains the API functions used by the GNU Portable
                    Threads Library.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-02-15 08:54:30 -0800
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="popt.html" title="Popt-1.16">Prev</a>
          <p>
            Popt-1.16
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="ptlib.html" title="Ptlib-2.10.11">Next</a>
          <p>
            Ptlib-2.10.11
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="genlib.html" title=
          "Chapter&nbsp;9.&nbsp;General Libraries">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
